#include<bits/stdc++.h>
using namespace std;
 
int nums[101];
int n;
int m;
bool flag;
 
void sum(int n,int m)
{
	if(nums[n] == m) flag = true;
	else if(n == 1) return;
	else
	{
		sum(n-1,m-nums[n]);
		sum(n-1,m);
	} 
} 
 
int main()
{
	cin>>n;
	for(int i =1;i<=n;i++)
	{
		cin>>nums[i]; 
	}
	cin>>m;
	flag = false;
	sum(n,m);
	if(flag)
	cout<<"YES"<<endl;
	else
	cout<<"NO"<<endl;
	return 0;
}